package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Classinfo {
    private Long id;

    //  班级名称
    private String name;

    //  班级人数
    private Integer number;

    //  关联属性
    private Employee employee;

    public String getJson(){
        Map<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("name", name);
        map.put("number", number);
        map.put("employee", employee);
        return JSON.toJSONString(map);
    }

}